package cn.medemede.k1;

public class Clinder extends Circle {

    double h;

    Clinder(){
        name="圆柱体";
    }

    @Override
    public double area() {
        return PI*r*r+PI*r*2*h;
    }

    @Override
    public double perimeter() {
        return PI*r*r*2;
    }

    @Override
    public String toString() {
        return "Clinder{" +
                "h=" + h +
                ", r=" + r +
                ", name='" + name + '\'' +
                '}';
    }
}
